package store.lunangangster.engine.service;

import java.util.Collection;
import java.util.Map;
import store.lunangangster.engine.impl.runtime.ProcessInstance;

public interface RuntimeService {

  ProcessInstance startProcessInstanceByKey(String processDefinitionKey);

  ProcessInstance startProcessInstanceByKey(String processInstanceName, String processDefinitionKey);

  ProcessInstance startProcessInstanceByKey(String processDefinitionKey, Map<String, Object> variables);

  ProcessInstance startProcessInstanceByKey(String processInstanceName, String processDefinitionKey, Map<String, Object> variables);

  ProcessInstance startProcessInstanceById(String processDefinitionId);

  ProcessInstance startProcessInstanceById(String processInstanceName, String processDefinitionId);

  ProcessInstance startProcessInstanceById(String processDefinitionId, Map<String, Object> variables);

  ProcessInstance startProcessInstanceById(String processInstanceName, String processDefinitionId, Map<String, Object> variables);

  void setVariable(String variableName, Object value, String executionId);

  void setVariables(Map<String, Object> variables, String executionId);

  void setLocalVariable(String variableName, Object value, String executionId);

  void setLocalVariables(Map<String, Object> variables, String executionId);

  Object getVariable(String variableName, String executionId);

  Map<String, Object> getVariables(Collection<String> variableNames, String executionId);

  Map<String, Object> getVariables(String executionId);
}
